﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using LingvoTranslate.Properties;

namespace LingvoTranslate
{
    public partial class TranslatorOptionsControl : UserControl
    {
        public TranslatorOptionsControl()
        {
            InitializeComponent();
        }

        private void browseLogPath_Click(object sender, EventArgs e)
        {
            browseLogPathDialog.FileName = browseLogPath.Text;

            if (browseLogPathDialog.ShowDialog() == DialogResult.OK)
                browseLogPath.Text = browseLogPathDialog.FileName;
        }

        private void openLogFile_Click(object sender, EventArgs e)
        {
            try
            {
                Process.Start(Settings.Default.GetWordLogPathCanonical());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error opening translation log");
            }
        }
    }
}
